<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改页面</title>
    <link rel='stylesheet' href="/static/layui/css/layui.css" media="all">
    {#    <link rel="stylesheet" href="/static/layui/css/modules/code.css">#}
    {#    <link rel="stylesheet" href="/static/layui/css/modules/laydate/default/laydate.css">#}
    {#    <link rel="stylesheet" href="/static/layui/css/modules/layer/default/layer.css">#}
</head>
<body>
<form id='from' action="" style="width: 200px ; margin: 0 300px" method="post">
    <!--        <div>输入姓名,点击获取成绩按钮可直接获取成绩</div>-->
    <div>
        <label class="form-label">姓名:</label>
        <input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off"
               class="layui-input" value="{{ students.name }}">
    </div>
    <div>
        <label class="form-label">语文:</label>
        <input type="text" name="chinese" required lay-verify="required" placeholder="请输入语文" autocomplete="off"
               class="layui-input" value="{{ students.chinese }}">
    </div>
    <div>
        <label class="form-label">数学:</label>
        <input type="text" name="math" required lay-verify="required" placeholder="请输入数学" autocomplete="off"
               class="layui-input" value="{{ students.math }}">
    </div>
    <div>
        <label class="form-label">英语:</label>
        <input type="text" name="english" required lay-verify="required" placeholder="英语" autocomplete="off"
               class="layui-input" value="{{ students.english }}">
    </div>
    <div>
        <button id='buttons' class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
    </div>

</form>

<script src="/static/layui/layui.js"></script>
<script>
    function sleep(delay) {
        var start = (new Date()).getTime();
        while ((new Date()).getTime() - start < delay) {
            continue;
        }
    }

    layui.use(function () {
        {#var table = layui.table#}
        var $ = layui.$
        {#var from = layui.from#}
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function (data) {
            {#parent.location.reload();#}
            parent.layer.close(parent.layer.getFrameIndex(window.name));
            parent.location.reload();
            return true;
        });
        //$('#buttons').click(function () {
//
        //})
    })
</script>
</body>
</html>